package com.simple.crawler.connect.http.response;

import com.simple.crawler.connect.Response;
import com.simple.crawler.connect.ext.StringResponseConverter;

import java.util.List;
import java.util.Map;

/**
 * @ClassName HttpResponse
 * @Author Administrator
 * @Desc TODO
 * @CreateTime 2019/8/3 22:16
 */
public class HttpResponse extends Response {

    private Map<String, String> header;

    public Map<String, String> getHeader() {
        return header;
    }

    public void setHeader(Map<String, String> header) {
        this.header = header;
    }

    public Object getHeader(String key) {
        if (this.header == null || this.header.isEmpty() || !this.header.containsKey(key)) {
            return null;
        }
        return this.header.get(key);
    }

}
